package com.sx.first.biz;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.sx.first.biz.ApplystorageBiz;
import com.sx.first.dao.ApplystorageDAO;
import com.sx.first.model.Applystorage;

@Service("applystorageBiz")
@Scope("prototype")
public class ApplystorageBiz {
	private ApplystorageDAO applystorageDAO;
	
	public void setApplystorageDAO(ApplystorageDAO applystorageDAO) {
		this.applystorageDAO = applystorageDAO;
	}

	public  List<Applystorage> findAll(int empId){
		return applystorageDAO.findAll(empId);
	}
	
	public List<Applystorage> findApply(){
		return applystorageDAO.findApply();
	}
	
	public void save(Applystorage app) {
		applystorageDAO.save(app);
		
	}

	public Applystorage findById(int appId) {
		return applystorageDAO.findById(appId);
	}

	public void delete(int appId) {
		applystorageDAO.delete(applystorageDAO.findById(appId));
		
	}

	public void update(Applystorage app) {
		applystorageDAO.update(app);
		
	}
	

}
